package com.example.erp.dto.permissionDTO;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor //自动创建无参构造函数
public class UserRoleDTO {
    /**
     * 用户标识
     */
    private Long userId;
    /**
     * 角色标识
     */
    private Long roleId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public UserRoleDTO(Long userId, Long roleId, LocalDateTime createTime) {
        this.userId = userId;
        this.roleId = roleId;
        this.createTime = createTime;
    }
}
